<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>Api接口列表</title>
<%@ include file="/WEB-INF/views/include.inc.jsp"%>
</head>
<body class="page-index">
<c:import url="/layout/header?columnId=0&tag=api"/>
<div class="main1 main1-center3">
  <div class="info">
    <h2>大数据智能获取</h2>
    <p>海量 多元 无限 大数据智能下载 API</p>
    <button id="main1-btn" class="btn">马上体验</button>
  </div>
</div>
<div class="contianer-fluid api-title">
  <div class="container">
    <div class="row">
      <a href="${contextPath }/main/api/list" class="col-md-6">
        <div class="api-title1 active"><span class="span1"></span><span class="span2">API接口列表</span></div>
      </a>
      <a href="${contextPath }/main/download" class="col-md-6">
        <div class="api-title2"><span class="span1"></span><span class="span2">可下载内容</span></div>
      </a>
    </div>
  </div>
</div>
<div class="container-fluid main-api">
  <page:paginationForm action="${contextPath }/main/api/list" page="${page }">
	<input type="hidden" name="title" value="${param.title }" />
  </page:paginationForm>
  <div class="container">
    <div class="api-search">
      <form action="${contextPath }/main/api/list">
        <div class="input-group">
          <input type="text" name="title" class="form-control" value="${param.title }">
          <span class="input-group-btn">
            <button class="btn btn-default" type="submit">搜索</button>
          </span>
        </div>
      </form>
      <ol class="breadcrumb">
        <li class="active">首页</li>
        <li>功能</li>
        <li>获取</li>
      </ol>
    </div>
    <div class="row mb150">
      <div class="col-md-3">
        <ul class="nav nav-pills nav-stacked nav-api">
          <h2>数据分类浏览</h2>
          <li role="presentation" class="active"><a href="${contextPath }/main/api/list">全部API<span class="badge">${apiCount }</span></a></li>
          <c:forEach var="level1" items="${menuModule.children }">
            <li id="type_${level1.id }" role="presentation"><a href="${contextPath }/main/api/list?type=${level1.id }">${level1.name }<span class="badge">${level1.num }</span></a></li>
          </c:forEach>
        </ul>
      </div>
      <div class="col-md-9">
        <c:forEach var="api" items="${apiList }">
          <div class="media">
            <div class="media-left">
              <c:if test="${empty api.url}">
                <img class="media-object" src="${contextPath }/styles/dsj/css/images/chart.png">
              </c:if>
              <c:if test="${not empty api.url}">
                <img class="media-object" src="${contextPath }${api.url }" style="width:76px;height:70px;">
              </c:if>
            </div>
            <div class="media-body">
              <a href="${contextPath }/main/api/view/${api.id}" target="_blank" class="media-heading">${api.title }</a>
              <span title="${api.description }">${api.description }</span>
            </div>
          </div>
        </c:forEach>
        <div class="clear"></div>
        <div class="mr30">
		  <page:pagination page="${page }" />
        </div>
      </div>
    </div>
  </div>
</div>
<c:import url="/layout/footer"/>
</body>
<script type="text/javascript">
$(function(){
	var id = getUrlParam('type');
	if (id != null) {
		$(".nav li").removeClass("active");
		$("#type_"+id).addClass("active");
	};
});
</script>
</html>
